import { ExtractPropTypes } from 'vue'
import { progressProps } from './type'
import { digits as isDigits } from '../../utils'

/**
 * props参数
 */
export const circleProgressProps = {
  ...progressProps,
  /** 圆环线宽, 单位rpx */
  borderWidth: {
    type: [String, Number],
    default: 14,
    validator: (value: string | number) => {
      return isDigits(String(value))
    }
  },
  /** 圆环整体宽度, 单位rpx */
  width: {
    type: [String, Number],
    default: 200,
    validator: (value: string | number) => {
      return isDigits(String(value))
    }
  }
}
export type CircleProgressProps = ExtractPropTypes<typeof circleProgressProps>
